﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using WebMatrix.WebData;

namespace MvcApplication2.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/
        //www.mono-software.com/blog/post/Mono/226/Adding-ASP-NET-SimpleMembership-to-an-existing-MVC-4-application/

        public ActionResult Index()
        {
            //WebSecurity.CreateUserAndAccount("zanotti", "fernando");
            //Roles.CreateRole("Administrator");
            //Roles.AddUserToRole("zanotti", "Administrator");

            return View();
        }

        public ActionResult Verificator(string user, string pass)
        {
            if (WebSecurity.Login(user, pass))
            {
                return View("Logged");
            }
            else { return View("Error"); }
        }

    }
}
